#include "tools_basic.h"
#include <queue>
using std::priority_queue;

template<class T>
void input(const vector<T>& data, priority_queue<T>& pq){
    for(auto& e: data)
        pq.push(e);
}

template<class T, class C>
void input(const vector<T>& data, priority_queue<T, vector<T>, C>& pq){
    for(auto& e: data)
        pq.push(e);
}

// template<class T>
void show(priority_queue<int> pq){
    while(!pq.empty()){
        cout << pq.top() << " ";
        pq.pop();
    }
    cout << endl;
};

template <class T1, class T2, class C>
void show(priority_queue<pair<T1, T2>, vector<pair<T1, T2>>, C> pq){
    while(!pq.empty()){
        auto e = pq.top();
        cout << e.first << " " << e.second << endl;
        pq.pop();
    }
}